/*
 * @Description: 你的代码我的心
 * @Author: GGB
 * @Date: 2021-12-30 14:40:41
 * @LastEditors: GGB
 * @LastEditTime: 2022-01-22 15:36:03
 */
// import { h } from 'vue';
import { DescItem } from '/@/components/Description';

// 描述信息字段
export const descItemSchema: DescItem[] = [
  {
    field: 'goods_image',
    label: '商品图片',
    render: (curVal, _) => {
      const style = {
        verticalAlign: 'middle',
        width: '60px',
        height: '60px',
      };
      return <img style={style} src={curVal} />;
    },
    // render: (curVal, _) =>
    //   h('img', {
    //     style: {
    //       verticalAlign: 'middle',
    //       width: '60px',
    //       height: '60px',
    //     },
    //     src: curVal,
    //   })
  },
  {
    field: 'goods_name',
    label: '商品名称',
  },
  {
    field: 'goods_price_min',
    label: '商品价格',
  },
  {
    field: 'stock_total',
    label: '当前库存',
  },
];
